Xbasic

CROSSLEVEL Function

Syntax

L crosslevel(filter)

Arguments

filter

A character filter expression that evaluates to a logical value and selects records from the set.

Description

Returns the record numbers of the parent level tables for records found when querying a set with one-many links.

Discussion

The CROSSLEVEL() function is useful when you have a form view of a set which has a one-many relationship. With the CROSSLEVEL() function you can filter the list of records using fields from the one-many child tables. Note : CROSSLEVEL() rcreates an intermediate index file of type .ASX. For this reason you must open the set with write access.

Example

For example, you might define the following query:

crosslevel("invoice_items->description = \"Techelon Safety Glasses\"")

This might find that there were 3 invoices that had these line items. When you viewed these 3 invoices, however, the embedded browse would show all of the line items for that invoice (not just the line items for Techelon Safety Glasses). Contrast this with the FLATTENQUERY() function which treats a multi-level set as a flat table.

See Also